package com.axxc.cloud.es.index.document;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "article", type = "article")
public class ArticleDemo  {


	@Id
	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.String) // 字段映射匹配,是否分词,存储,分词器指定
	private Integer id;// 主键

	@Field(index = FieldIndex.analyzed, store = true, analyzer = "ik", searchAnalyzer = "ik", type = FieldType.String)
	private String title;// 文章标题

	@Field(index = FieldIndex.analyzed, store = true, analyzer = "ik", searchAnalyzer = "ik", type = FieldType.String)
	private String content;// 文章内容

	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.String)
	private String author;// 文章作者

	@Field(index = FieldIndex.not_analyzed, store = true,pattern="yyyy:mm:dd hh:MM:ss", type = FieldType.String)
	private String  createTime;// 文章发表时间
	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.Long)
	private Long comment = 0L;// 评论数
	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.Long)
	private Long readNum = 0L;// 阅读量
	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.Long)
	private Long likeNum = 0L;// 关注数

	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.Boolean)
	private Boolean deleteTag = false;// 删除标记
	@Field(index = FieldIndex.not_analyzed, store = true,pattern="yyyy:mm:dd hh:MM:ss", type = FieldType.String)
	private String deleteTime;// 删除时间
	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.String)
	private String deleteOperator;// 删除者

	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.Boolean)
	private Boolean checkTag = false;// 审核标记
	@Field(index = FieldIndex.not_analyzed, store = true,pattern="yyyy:mm:dd hh:MM:ss", type = FieldType.String)
	private String checkTime;// 审核时间
	@Field(index = FieldIndex.not_analyzed, store = true, type = FieldType.String)
	private String checkeOperator;// 审核者

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public Long getComment() {
		return comment;
	}

	public void setComment(Long comment) {
		this.comment = comment;
	}

	public Long getReadNum() {
		return readNum;
	}

	public void setReadNum(Long readNum) {
		this.readNum = readNum;
	}

	public Long getLikeNum() {
		return likeNum;
	}

	public void setLikeNum(Long likeNum) {
		this.likeNum = likeNum;
	}

	public Boolean getDeleteTag() {
		return deleteTag;
	}

	public void setDeleteTag(Boolean deleteTag) {
		this.deleteTag = deleteTag;
	}

	public String getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(String deleteTime) {
		this.deleteTime = deleteTime;
	}

	public String getDeleteOperator() {
		return deleteOperator;
	}

	public void setDeleteOperator(String deleteOperator) {
		this.deleteOperator = deleteOperator;
	}

	public Boolean getCheckTag() {
		return checkTag;
	}

	public void setCheckTag(Boolean checkTag) {
		this.checkTag = checkTag;
	}

	public String getCheckTime() {
		return checkTime;
	}

	public void setCheckTime(String checkTime) {
		this.checkTime = checkTime;
	}

	public String getCheckeOperator() {
		return checkeOperator;
	}

	public void setCheckeOperator(String checkeOperator) {
		this.checkeOperator = checkeOperator;
	}

}